$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
})


/**
 * 提交
 */
function saveModule(){
	
	if($('#operationName').val().trim()){
		var operationName = $('#operationName').val();
		var operationNames = $('#operationNames').val();
		if(operationNames.indexOf('$'+operationName+'$') >= 0){
			parent.layer.msg("名称已存在！", {icon:5,time:2000});
			return;
		}
	}else{
		parent.layer.msg("名称不能为空！", {icon:5,time:2000});
		return;
	}
	
	$.ajax({  
		url: '/admin/module/parent',  
        type: 'post',  
        dataType: 'json', 
        data:$('#form-module').serialize(),
        success: function (result) {  
        	parent.layer.msg(result.message, {icon:6,time:2000});
        	var index = parent.layer.getFrameIndex(window.name);
//			parent.$('#childFormVal').val($('#parentOperationId').val());
			parent.$('#childFormMsg').val("保存成功");
			parent.layer.close(index);
        },
        error:function(){
        	var index = parent.layer.getFrameIndex(window.name);
        	parent.layer.msg("保存失败", {icon:5,time:2000});
        	parent.layer.close(index);
        }
    });  
}